<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
  <script type="text/javascript">
  //enumerable
  //var teams = new Array('拜仁慕尼黑','沙尔克04','多特蒙德','莱比锡红牛');
  //var teams = ['拜仁慕尼黑','沙尔克04','多特蒙德','莱比锡红牛'];
    var teams = {'one':'拜仁慕尼黑','two':'沙尔克04','three':'多特蒙德','four':'莱比锡红牛'};//多特蒙德被遍历时候隐藏
    Object.defineProperty(teams,'two',{configurable:false});//禁止删除沙尔克04
    delete teams.two;
  
  Object.defineProperty(teams,'three',{enumerable:false});
  for(index in teams){
	  //alert(teams[index]);
  }
  var clazz = {};
  Object.defineProperty(clazz, "name", {
  writable: false,//true与false的区别
  value: "java18"
  });
  //alert(clazz.name);
  clazz.name = "java15";
  //alert(clazz.name); 
  
  function team(){
	  this.name = "托特纳姆热刺";
  }
  
  team.prototype.coachName = '穆尼尼奥';//追加属性
  var team1 = new team();
  alert(team1.coachName);
  </script>
</body>
</html>